package net.csdn.business.discuss.api.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author likun
 * @date 2022/6/16 20:12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DiscussId {
    @TableId(value = "`id`", type = IdType.AUTO)
    private Long id;
    /**资源id**/
    private String sourceId;
    /**资源类型：1:discuss;2:discuss_commnet;3:discuss_comment_reply**/
    private Integer sourceType;
    /**最大**/
    private Integer maxId;

    public DiscussId(String sourceId, Integer maxId) {
        this.sourceId = sourceId;
        this.maxId = maxId;
    }

    public DiscussId(String sourceId) {
        this.sourceId = sourceId;
    }
}
